<!--
 * @Description: 
 * @Author: HYH
 * @LastEditors: HYH
 * @LastEditTime: 2023-02-10 17:26:14
-->
<script setup lang="ts">
import cn from 'element-plus/lib/locale/lang/zh-cn'
import en from 'element-plus/lib/locale/lang/en'
const getLocale = () => {
  const lang = Tools.LocalStorage.getItem('lang')?.toLowerCase() || navigator.language.toLowerCase()
  switch (lang) {
    case 'zh-cn':
      return cn
    case 'en-us':
      return en
    default:
      return cn
  }
}
const state = reactive({
  locale: getLocale()
})
</script>
<template>
  <div class="w-screen h-full">
    <el-config-provider :locale="state.locale">
      <router-view />
    </el-config-provider>
  </div>
</template>
<style lang="scss" scoped></style>
